import Cookies from 'js-cookie'
import { getLanguage } from '@/lang/index'

const state = {
  zuwangFromJS: 'desktop',
  zuwangFromRes: 'desktop'
}

const mutations = {

  setZuwangFromJS: (state, zuwangFromJS) => {
    state.zuwangFromJS = zuwangFromJS
    // Cookies.set('size', size)
  },
  setZuwangRes: (state, zuwangFromRes) => {
    state.zuwangFromRes = zuwangFromRes
    // Cookies.set('size', size)
  }
}

const actions = {
  setZuwangFromJS({ commit }, sn) {
    commit('setZuwangFromJS', sn)
  },
  setZuwangRes({ commit }, sn) {
    commit('setZuwangRes', sn)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
